import { toSuccess, useEntityManager } from "@sker/core"
import { AutoUser } from "@sker/entities"


export default async () => {
    const list = await useEntityManager(async m => {
        return await m.find(AutoUser, { select: {username: true, device_count: true, id: true}})
    })
    return toSuccess(list, list.length)
}